package NM;

public class text {
    public static void main(String[] args ){
        MySingleList mySingleList=new MySingleList();
        mySingleList.createList() ;
        mySingleList.disPlay();
        //MySingleList.ListNode node1=mySingleList.reverseList();
        //System.out.println("反转后的单链表:");
        mySingleList.disPlay();
        MySingleList.ListNode node2=mySingleList.middleNode();
        System.out.println("中间节点的域值为："+node2.val);
         int  ret=mySingleList.kthToLast(3);
         System.out.println("倒数第k个值为："+ret);

    }
}
